package fr.norsys.mapper.console.model;

import fr.norsys.mapper.console.utils.UIDGenerator;

public class Attribute extends BaseObject {
	private static final long serialVersionUID = 7925681717644346567L;
	private String id;
	private String name;
	private String attributeLDAP;
	private String defaultValue ="";
	private int mandatory = ConsoleCst.UNKNOWN_STATUS;
	private String inputOutput;
	private String rule;
	private String ignoreNull;
	
	public Attribute() {
		super();
	}
	public String getIgnoreNull() {
		return ignoreNull;
	}
	public void setIgnoreNull(String ignoreNull) {
		this.ignoreNull = ignoreNull;
	}
	public Attribute(String name) {
		super();
		this.id = UIDGenerator.generateId();
		this.name = name;
	}
	public Attribute(String name, String attributeLDAP, String inputOutput) {
		super();
		this.id = UIDGenerator.generateId();
		this.name = name;
		this.attributeLDAP = attributeLDAP;
		this.inputOutput = inputOutput;
	}
	
	public Attribute(String name, String attributeLDAP, String inputOutput, String rule, String ignoreNull) {
		super();
		this.id = UIDGenerator.generateId();
		this.name = name;
		this.attributeLDAP = attributeLDAP;
		this.inputOutput = inputOutput;
		this.rule = rule;
		this.ignoreNull = ignoreNull;
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getAttributeLDAP() {
		return attributeLDAP;
	}
	public void setAttributeLDAP(String attributeLDAP) {
		this.attributeLDAP = attributeLDAP;
	}
	public String getInputOutput() {
		return inputOutput;
	}
	public void setInputOutput(String inputOutput) {
		this.inputOutput = inputOutput;
	}
	public String getRule() {
		return rule;
	}
	public void setRule(String rule) {
		this.rule = rule;
	}
	public int getMandatory() {
		return mandatory;
	}
	public void setMandatory(int mandatory) {
		this.mandatory = mandatory;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
}